﻿#pragma once

#include "vg/simple_shape.h"
#include "common.h"
#include "vg/base.h"
#include "draw.h"
#include <vector>

namespace anip
{
	namespace vg
	{
		class SimpleShape : public Primitive
		{
			serializable_id(SimpleShape, 0x683262);

		private:
			class Renderer;

		public:
			enum class Type
			{
				Square,
				Ellipse,
				RoundedSquare
			};

			Type type;
			kcolor color;
			kvec2 position;
			kvec2 size;
			kfloat parameter = 0;

			SimpleShape(Type t = Type::Square, vec2 pos = { 0, 0 }, vec2 siz = { 1, 1 }) :
				type(t), position(pos), size(siz), color(Colors::white) {}

			bool isInside(invec2 p, float time) override;
			GraphicsRenderer* createRenderer() override;
		};
	}
}